﻿package
{
	import com.bizmlib.framework.flashapp.FlashAppEngine;
	
	import appns;
	import mvc.*;
	
	
	public class AppEngine extends FlashAppEngine
	{
		
		public function AppEngine()
		{
		}
		
		
		appns function get model():AppModel
		{
			return super.model as AppModel;
		}
		appns function get view():AppView
		{
			return super.view as AppView;
		}
		appns function get controller():AppController
		{
			return super.controller as AppController;
		}
		
		
		override protected function startUp():Boolean
		{
			var model:AppModel = new AppModel();
			var view:AppView = new AppView(model);
			var controller:AppController = new AppController(view);
			
			return engineCore.startUp(model, view, controller);
		}
		
		
		override public function toString():String
		{
			return "[AppEngine]";
		}
	}
}